//
//  ScrollTableViewCell.m
//  MyProject
//
//  Created by apple on 15/10/30.
//  Copyright (c) 2015年 apple. All rights reserved.
//

#import "ScrollTableViewCell.h"

@implementation ScrollTableViewCell

-(void)createFirstCellWithArr:(NSMutableArray *)arr
{
    self.arr = arr;
    
    self.backgroundColor = [UIColor colorWithHue:235/255.f saturation:245/245.f brightness:15/255.f alpha:0.1];
    
    for (int i = 0; i<arr.count; i++) {
        
        float width = ([UIScreen mainScreen].bounds.size.width - 15*3)/2;
        //float height = width;
        
        int line = i%2;
        int row = i/2;
        UIImageView *imgV = [[UIImageView alloc]initWithFrame:CGRectMake((width+15)*line+15, (width+15)*row, width, width)];
        [self addSubview:imgV];
        [imgV setImage:[UIImage imageNamed:[[arr objectAtIndex:i] objectAtIndex:1]]];
        
        imgV.layer.cornerRadius = width/2;
        imgV.layer.masksToBounds = YES;

        
    }
    
}





- (void)awakeFromNib {
    // Initialization code
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
